package com.hanwei.uap.common.enums.sstn;

import java.util.HashMap;
import java.util.Map;

public enum ChannelType {
    SERVER_REQ(0), SERVER_RSP(1), CLIENT_REQ(2), CLIENT_RSP(3);
    private int value;

    ChannelType(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    private static final Map<Integer, ChannelType> map = new HashMap<Integer, ChannelType>();

    static {
        for (ChannelType p : ChannelType.values()) {
            map.put(p.value, p);
        }
    }

    public static ChannelType getChannelTypeByValue(int value) {
        return map.get(value);
    }
}
